<?php
/**
 * Created by PhpStorm.
 * User: dungnt13
 * Date: 12/11/14
 * Time: 3:08 PM
 */

class Club extends Eloquent
{
    public function members()
    {
        return $this->belongsToMany('User', 'users_clubs', 'club_id', 'user_id');
    }

    public function rootAdmin()
    {
        return $this->belongsTo('User', 'admin_id');
    }
} 